/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
using System;
using System.Collections.Generic;

using Aliyun.Acs.Core.Transform;
using Aliyun.Acs.dt_oc_info.Model.V20220829;

namespace Aliyun.Acs.dt_oc_info.Transform.V20220829
{
    public class GetOcJusticeTerminalCaseResponseUnmarshaller
    {
        public static GetOcJusticeTerminalCaseResponse Unmarshall(UnmarshallerContext _ctx)
        {
			GetOcJusticeTerminalCaseResponse getOcJusticeTerminalCaseResponse = new GetOcJusticeTerminalCaseResponse();

			getOcJusticeTerminalCaseResponse.HttpResponse = _ctx.HttpResponse;
			getOcJusticeTerminalCaseResponse.Code = _ctx.StringValue("GetOcJusticeTerminalCase.Code");
			getOcJusticeTerminalCaseResponse.Success = _ctx.BooleanValue("GetOcJusticeTerminalCase.Success");
			getOcJusticeTerminalCaseResponse.Message = _ctx.StringValue("GetOcJusticeTerminalCase.Message");
			getOcJusticeTerminalCaseResponse.TotalNum = _ctx.IntegerValue("GetOcJusticeTerminalCase.TotalNum");
			getOcJusticeTerminalCaseResponse.PageIndex = _ctx.IntegerValue("GetOcJusticeTerminalCase.PageIndex");
			getOcJusticeTerminalCaseResponse.PageNum = _ctx.IntegerValue("GetOcJusticeTerminalCase.PageNum");
			getOcJusticeTerminalCaseResponse.RequestId = _ctx.StringValue("GetOcJusticeTerminalCase.RequestId");

			List<GetOcJusticeTerminalCaseResponse.GetOcJusticeTerminalCase_DataItem> getOcJusticeTerminalCaseResponse_data = new List<GetOcJusticeTerminalCaseResponse.GetOcJusticeTerminalCase_DataItem>();
			for (int i = 0; i < _ctx.Length("GetOcJusticeTerminalCase.Data.Length"); i++) {
				GetOcJusticeTerminalCaseResponse.GetOcJusticeTerminalCase_DataItem dataItem = new GetOcJusticeTerminalCaseResponse.GetOcJusticeTerminalCase_DataItem();
				dataItem.Name = _ctx.StringValue("GetOcJusticeTerminalCase.Data["+ i +"].Name");
				dataItem.EntName = _ctx.StringValue("GetOcJusticeTerminalCase.Data["+ i +"].EntName");
				dataItem.FilingDate = _ctx.StringValue("GetOcJusticeTerminalCase.Data["+ i +"].FilingDate");
				dataItem.TerminalNum = _ctx.StringValue("GetOcJusticeTerminalCase.Data["+ i +"].TerminalNum");
				dataItem.CaseNum = _ctx.StringValue("GetOcJusticeTerminalCase.Data["+ i +"].CaseNum");
				dataItem.Court = _ctx.StringValue("GetOcJusticeTerminalCase.Data["+ i +"].Court");
				dataItem.TerminateDate = _ctx.StringValue("GetOcJusticeTerminalCase.Data["+ i +"].TerminateDate");
				dataItem.ExecAmount = _ctx.StringValue("GetOcJusticeTerminalCase.Data["+ i +"].ExecAmount");
				dataItem.FailPerformAmount = _ctx.StringValue("GetOcJusticeTerminalCase.Data["+ i +"].FailPerformAmount");

				getOcJusticeTerminalCaseResponse_data.Add(dataItem);
			}
			getOcJusticeTerminalCaseResponse.Data = getOcJusticeTerminalCaseResponse_data;
        
			return getOcJusticeTerminalCaseResponse;
        }
    }
}
